package com.classloader;

import com.hotrepalce.MyClassLoader;

/**
 * @author: csh
 * @Date: 2021/12/25 16:16
 * @Description:
 */
public class MyClassLoaderTest {
    public static void main(String[] args) throws ClassNotFoundException {
        MyClassLoader loader = new MyClassLoader("/");
        Class<?> aClass = loader.loadClass("com.hotrepalce.HotTest");
        System.out.println(aClass.getClassLoader().getClass().getName());
        System.out.println("父类加载器:"+aClass.getClassLoader().getParent().getClass().getName());
        System.out.println(loader.getParent());
    }
}
